<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<title>libxls</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css" /> 
</head>
<body>
	<div id="menu" style="float: left; width: 150px;">
	Project hosted by <a href="http://sourceforge.net/projects/libxls/"><img style="vertical-align: middle; border-style: none;" src="http://sflogo.sourceforge.net/sflogo.php?group_id=85885&amp;type=1" width="88" height="31" alt="SourceForge.net Logo" /></a>
	<a href="index.html">Home</a>
	<a href="http://sourceforge.net/projects/libxls/">Sourceforge page</a>
	<a href="http://libxls.svn.sourceforge.net/viewvc/libxls/">Browse SVN</a>
	</div>
	<div id="content" style="margin-left: 200px; margin-right: 200px;">
	<h1>libxls</h1>
	<h2>What is libxls ?</h2>
	<p>libxls is a <span style="font-weight: bold">C library</span> which can <span style="font-weight: bold">read Excel (xls) files</span>. It has been tested on Linux x86 and Cygwin but may work on any little-endian system. It is <span style="font-weight: bold">not compatible with big endian systems</span>.</p>
	<p>libxls <span style="font-weight: bold">can read excel files since Excel 97</span> (the BIFF8 format)</p>
	<p>libxls <span style="font-weight: bold">cannot write</span> Excel files.</p>
	<p>libxls is also shipped with <span style="font-weight: bold">xls2csv</span>, a tool which <span style="font-weight: bold">converts an xls file to a csv format</span>, more suitable for parsing.</p>
	<p>The <a href="http://sc.openoffice.org/excelfileformat.pdf">OpenOffice.org's Documentation of the Microsoft Excel File Format</a> and <a href="http://sc.openoffice.org/compdocfileformat.pdf">OpenOffice.org's Coumpound Document file format</a> were of much help to correct bugs in libxls.</p>

	<h2>Download</h2>
	<h3>Current "stable" version (V0.2.0)</h3>
	<ul>
	<li>Source: <a href="http://downloads.sourceforge.net/libxls/libxls-0.2.0.tar.gz">libxls-0.2.0.tar.gz</a></li>
	<li>Win32 binary: <a href="http://downloads.sourceforge.net/libxls/libxls-0.2.0-win32.tar.gz">libxls-0.2.0-win32.tar.gz</a></li>
	<li>Mac binary: <a href="http://downloads.sourceforge.net/libxls/libxls-0.2.0-i386-apple.tar.gz">libxls-0.2.0-i386-apple.tar.gz</a></li>
	<li>Cygwin binary: <a href="http://downloads.sourceforge.net/libxls/libxls-0.2.0-cygwin.tar.gz">libxls-0.2.0-cygwin.tar.gz</a></li>
	</ul>
	<h3>First release</h3>
	<p>This version contained a php extension to parse XLS files, not included in the automatic build process, and only distributed as a Windows DLL.<br/>
	<a href="https://sourceforge.net/project/showfiles.php?group_id=85885&package_id=109392&release_id=216638">libxls 0.0.1 beta</a></p>

	<h2>How to use libxls ?</h2>
	<p>libxls is a C library, so you need to include the right header files:</p>
	<pre>#include &lt;stdio.h&gt;
#include &lt;libxls/xls.h&gt;</pre>
	<p>You also need to link with <code>libxlsreader.a</code>.</p>
	<p>Then you'll need to open an Excel file:</p>
	<pre>xlsWorkBook* pWB;
pWB=xls_open("file.xls", "iso-8859-15//TRANSLIT");</pre>
	<p>For a good start you could have a look to <a href="http://libxls.svn.sourceforge.net/viewvc/libxls/trunk/libxls/src/xls2csv.c?view=markup">xls2csv.c</a>.</p>

	<h2 style="margin-left: 0; padding-left: 0;">How to use xls2csv ?</h2>
	<p>xls2csv takes as its first argument the name of an Excel file. It write to standard output the file converted to csv format.</p>
	<p>For example, we can convert the file test.xls into a csv file called test.csv with the following command:
	<code style="white-space: nowrap">xls2csv test.xls &gt; test.csv</code></p>

	<h2>Changelog</h2>
	<h3>Current SVN</h3>
	<h4>New features</h4>
	<ol>
	<li>libxls can read Excel formulas results saved in files:
	<pre>if(cell-&gt;id == 0x06) { // formula
if(cell->l == 0) { // its a number
	... use cell-&gt;d
} else {
	if(cell-&gt;str == "bool") // its boolean, and test cell-&gt;d &gt; 0.0 for true
	if(cell-&gt;str == "error") // formula is in error
	else ... cell-&gt;str is valid as the result of a string formula.
}</pre></li>
	<li>New functions <code>xls_row</code> and <code>xls_cell</code> to get cell content. Deprecates the use of direct access to row and cell content.
	<pre>xlsRow*  xls_row(xlsWorkSheet* pWS, WORD cellRow);
xlsCell* xls_cell(xlsWorkSheet* pWS, WORD cellRow, WORD cellCol);</pre></li>
	</ol>
	<h3>V0.2.0</h3>
	<h4>Bugs corrected</h4>
	<ol>
	<li>Corrected Cygwin bug when decoding Excel Numbers</li>
	<li>OLE2 file header id is now checked</li>
	<li>Corrected wrong fcell usage which could lead to cell moves on a row</li>
	<li>There was always one more empty cell on the right on each row</li>
	<li>Some formattings in xls_getfcell where incorrects</li>
	<li>Corrected some reading problems with SST having CONTINUE records</li>
	</ol>

	</div>

</body>
</html>